﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Egora.Pvp;
using Egora.PvpHttpModule;

namespace TestPvpApplication
{
  public partial class PvpModuleTestPage : System.Web.UI.Page
  {
    protected void Page_Load(object sender, EventArgs e)
    {
      Dictionary<string, string> headers = new Dictionary<string, string>();
      PvpPrincipal principal = (PvpPrincipal) Context.User; 
      
      foreach (PvpHeader h in Enum.GetValues(typeof(PvpHeader)))
        headers.Add(h.ToString(), principal.GetHeader(h));
      
      HeaderGrid.DataSource = headers;
    }

    protected void Page_PreRender(object sender, EventArgs e)
    {
      DataBind();
    }
  }
}
